#!/usr/bin/env node
//推送流
const {Readable}=require('stream'),
      //Readable=require('stream').Readable;
      fs=require('fs')

const rs=new Readable();//产生了一个可读流
rs.push('hello');//存入缓存
rs.push('world');
rs.push(null);//数据写完

rs.pipe(process.stdout);//通过管道将其接到输出流
//rs.pipe(fs.createWriteStream('./test.txt'));






